.comments-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

.comment-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.comment-input:focus {
    outline: none;
    border-color: #007AFF;
}

.comment-submit {
    align-self: flex-end;
    background: #007AFF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s ease;
}

.comment-submit:hover {
    background: #0051FF;
}

.comments-list {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comments-title {
    font-size: 18px;
    color: #1c1c1e;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #1c1c1e;
    font-size: 14px;
}

.comment-time {
    color: #8e8e93;
    font-size: 12px;
}

.comment-text {
    color: #3a3a3c;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #8e8e93;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.like-btn:hover {
    color: #ff3b30;
}

.like-btn.liked {
    color: #ff3b30;
}

.no-comments {
    text-align: center;
    padding: 40px 0;
    color: #8e8e93;
}

.no-comments i {
    font-size: 40px;
    margin-bottom: 10px;
}

.no-comments p {
    font-size: 14px;
}

/* iOS 风格的卡片容器 */
.ios-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

/* 放大iOS风格的标题 */
.ios-title {
    font-size: 24px; /* 从20px增大到24px */
    font-weight: 600;
    color: #1c1c1e;
    margin-bottom: 20px; /* 从16px增加到20px给更多空间 */
    display: flex;
    align-items: center;
    gap: 10px; /* 增加图标与文字的间距 */
    line-height: 1.3; /* 增加行高以提高可读性 */
}

/* 增加标题中的图标大小 */
.ios-title i {
    font-size: 22px; /* 添加图标大小 */
    color: #007AFF; /* 使图标为蓝色 */
}

/* 顶部区域容器样式 */
.header-content {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* 标题样式调整 */
.site-title {
    font-size: 28px;
    font-weight: 600;
    color: #1c1c1e;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0;
    margin: 0;
    line-height: 1.2;
}

.site-title:hover {
    color: #007AFF;
}

/* 搜索区域容器样式调整 */
.search-container {
    display: flex;
    align-items: stretch; /* 改为stretch确保子元素等高 */
    gap: 12px;
    width: 100%;
    max-width: 600px;
    height: 44px; /* 固定容器高度 */
}

/* 搜索框样式微调 */
.ios-search {
    background: #f2f2f7;
    border-radius: 10px;
    border: none;
    padding: 0 16px;
    font-size: 16px;
    color: #1c1c1e;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 300px;
    height: 100%; /* 使用100%继承容器高度 */
    line-height: 44px; /* 与高度相同 */
    margin: 0;
    box-sizing: border-box; /* 确保padding不会影响整体高度 */
}

/* 搜索按钮样式微调 */
.search-button {
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-width: 100px;
    height: 100%; /* 使用100%继承容器高度 */
    box-sizing: border-box;
}

.search-button:hover {
    background: #0051FF;
    transform: translateY(-1px);
}

.search-button i {
    font-size: 12px;
}

/* iOS 风格的按钮 */
.ios-button {
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ios-button:hover {
    background: #0051FF;
    transform: translateY(-1px);
}

.ios-button.secondary {
    background: #5856D6;
}

.ios-button.warning {
    background: #FF3B30;
}

/* iOS 风格的列表 */
.ios-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

/* 移除 ios-list-item 的动画效果 */
.ios-list-item {
    margin-bottom: 16px;
}

/* 将动画效果移至 item-content */
.ios-list-item .item-content {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px;
}

/* 仅当悬浮在特定项上时触发动画 */
.ios-list-item .item-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ios-list-item a {
    text-decoration: none;
    color: #1c1c1e;
    font-size: 15px;
    font-weight: 500;
    padding: 16px;
    display: block;
}

.meta {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ios-tag {
    background: #f2f2f7;
    color: #666;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.ios-tag:hover {
    background: #e5e5ea;
    transform: translateY(-1px);
}

/* iOS 风格的头像 */
.ios-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* iOS 风格的徽章 */
.ios-badge {
    background: #FF3B30;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* 修改get_user_recommend()函数生成的HTML的样式 */
.post {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post:hover img {
    transform: scale(1.05);
}

.post .wrapper {
    padding: 16px;
}

.post h6 {
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1e;
    margin: 0 0 8px;
    line-height: 1.4;
}

.post p, .post a {
    color: #666;
    font-size: 13px;
    margin: 4px 0;
    text-decoration: none;
}

/* iOS 风格的导航 */
.nav-container {
    width: 100%;
    background: #ffffff;
    margin: 0 0 16px 0; /* 添加底部间距 */
    padding: 16px 0;
    border-radius: 12px; /* 统一圆角 */
    border: none; /* 移除边框 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* 添加阴影效果 */
    /* 移除overflow: hidden，它会裁剪下拉菜单 */
    margin-bottom: 0; /* 移除底部间距 */
    border-radius: 12px 12px 0 0; /* 只保留顶部圆角 */
}

.ios-nav {
    width: 100%;
    max-width: 1200px; /* 添加最大宽度 */
    margin: 0 auto; /* 居中对齐 */
    padding: 0;
    box-sizing: border-box;
}

.ios-nav-list {
    display: flex;
    justify-content: space-between; /* 改为两端对齐，实现均匀分布 */
    align-items: center;
    padding: 0 24px;
    margin: 0;
    list-style: none;
    width: 100%;
    background: transparent;
}

/* 修改导航项样式 */
.ios-nav-item {
    position: relative;
    font-size: 15px;
    color: #1c1c1e;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: transparent;
    white-space: nowrap;
    font-weight: 500;
    text-align: center;
    flex: 1;
    max-width: 160px;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    position: relative; /* 确保相对定位 */
}

.ios-nav-item i {
    font-size: 14px; /* 调整图标大小 */
    margin-right: 4px; /* 右侧间距，确保与文字有适当距离 */
    line-height: 1; /* 确保图标行高与文字匹配 */
}

.ios-nav-item:hover {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
    transform: none; /* 移除上浮动画 */
}

.ios-nav-item.active {
    color: #007AFF;
    font-weight: 600;
    background: rgba(0, 122, 255, 0.1);
}

/* 移除不必要的效果 */
.ios-nav-item::after {
    display: none;
}

.ios-nav-item:active {
    transform: none;
    background: rgba(0, 122, 255, 0.15);
}

/* 移除深色模式适配 */
@media (prefers-color-scheme: dark) {
    .nav-container, .ios-nav-item {
        background: #ffffff;
        color: #1c1c1e;
    }
}

/* 导航下拉菜单样式重写 */
.nav-dropdown {
    position: relative;
    display: inline-block;
    height: 100%;
    z-index: 1001; /* 确保下拉菜单在最上层 */
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding-right: 24px;
    position: relative;
    justify-content: center; /* 内容居中 */
    pointer-events: none; /* 禁用点击 */
    cursor: default;
}

.dropdown-trigger i:first-of-type {
    /* 对第一个图标(标签图标)进行定位 */
    margin-right: 4px;
    position: static; /* 取消绝对定位 */
    transform: none;
}

.dropdown-trigger i:last-of-type {
    /* 对最后一个图标(下拉箭头)进行定位 */
    /* 保持原有的定位方式 */
    display: none;
}

.dropdown-trigger i {
    font-size: 12px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

/* 修改下拉菜单样式 */
.dropdown-menu {
    position: static; /* 改为静态定位，不再弹出 */
    opacity: 1; /* 始终可见 */
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 100%; /* 占满容器宽度 */
    padding: 16px 24px;
    margin: 16px 0 0 0;
    background: #f5f5f7;
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    transition: none;
}

/* 调整下拉菜单显示逻辑 */
.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto; /* 确保可以点击 */
}

.dropdown-item {
    flex: 0 0 auto; /* 防止项目被压缩 */
    padding: 8px 16px;
    white-space: nowrap; /* 文本不换行 */
    color: #1c1c1e;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 修改下拉菜单样式 */
.dropdown-menu {
    position: static; /* 改为静态定位，不再弹出 */
    opacity: 1; /* 始终可见 */
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 100%; /* 占满容器宽度 */
    padding: 16px 24px;
    margin: 16px 0 0 0;
    background: #f5f5f7;
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    transition: none;
}

/* 显示下拉菜单时的样式 */
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 修改导航项样式 */
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

/* 添加箭头旋转动画 */
.nav-dropdown.active .dropdown-trigger i:last-child {
    transform: rotate(180deg);
}

/* 下拉菜单项样式 */
.dropdown-item {
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 主内容区域样式优化 */
#main-content {
    background: #ffffff;
    border-radius: 12px; /* 统一圆角 */
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* 添加阴影效果 */
    margin-bottom: 16px;
}

/* 商品展示区样式 */
.wrap-content {
    padding: 0; /* 移除内边距，因为已经在main-content中添加了padding */
}

/* 商品卡片网格布局 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* 商品卡片样式 */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 商品链接样式 */
.product-card a {
    text-decoration: none;
    color: inherit;
}

/* 商品图片容器 */
.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* 商品信息样式 */
.product-info {
    padding: 16px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #1c1c1e;
    margin: 0 0 8px;
    line-height: 1.4;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: #ff3b30;
}

/* 商品卡片额外样式 */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.sort-container {
    margin-left: auto;
    padding-left: 20px;
}

.sort-form {
    display: flex;
    align-items: center;
}

/* 排序选择器样式优化 */
.sort-select {
    appearance: none;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 12px; /* 统一圆角 */
    padding: 12px 36px 12px 16px; /* 调整内边距 */
    font-size: 15px;
    color: #1c1c1e;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* 添加阴影 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23007AFF' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sort-select:hover {
    border-color: #007AFF;
    transform: translateY(-1px); /* 添加悬浮效果 */
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.sort-select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 下拉选项样式 */
.sort-select option {
    background: #fff;
    color: #1c1c1e;
    padding: 12px;
    font-size: 15px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.pagination-wrapper {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e5ea;
}

.page-item {
    list-style: none;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    background: #fff;
    color: #1c1c1e;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: #f2f2f7;
    color: #007AFF;
}

.page-item.active .page-link {
    background: #007AFF;
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* 下拉菜单容器 */
.dropdown {
    position: relative;
}

/* 下拉菜单 */
.dropdown-menu {
    position: static; /* 改为静态定位，不再弹出 */
    opacity: 1; /* 始终可见 */
    visibility: visible;
    transform: none;
    box-shadow: none;
    min-width: 100%; /* 占满容器宽度 */
    padding: 16px 24px;
    margin: 16px 0 0 0;
    background: #f5f5f7;
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    transition: none;
}

/* 显示下拉菜单 */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉菜单项 */
.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #1c1c1e;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 基于物品推荐的iOS风格样式 */
.recommendations-section {
    margin: 20px 0;
    position: relative;
}

.recommendations-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.recommendations-scroll {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 8px 4px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #d1d1d6 #f2f2f7;
}

.recommendations-scroll::-webkit-scrollbar {
    height: 8px;
}

.recommendations-scroll::-webkit-scrollbar-track {
    background: #f2f2f7;
    border-radius: 4px;
}

.recommendations-scroll::-webkit-scrollbar-thumb {
    background-color: #d1d1d6;
    border-radius: 4px;
}

.ios-recommend-item {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ios-recommend-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.recommend-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.recommend-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ios-recommend-item:hover .recommend-image img {
    transform: scale(1.05);
}

.recommend-info {
    padding: 12px;
}

.recommend-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    margin: 0 0 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8e8e93;
    font-size: 12px;
}

.recommend-shop {
    display: flex;
    align-items: center;
    gap: 4px;
}

.refresh-button {
    padding: 8px 16px;
    font-size: 14px;
}

/* 推荐部分的网格布局 - 固定3列 */
.recommendations-section .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px 0;
}

/* 添加新的标签区域容器 */
.tags-section {
    background: #f5f5f7;
    padding: 0 0 16px 0;
    margin-bottom: 16px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 标签区域容器 */
.tags-section {
    width: 100%;
    background: #f5f5f7;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tags-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.tag-item {
    padding: 8px 16px;
    background: #ffffff;
    border-radius: 8px;
    color: #1c1c1e;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tag-item:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    transform: translateY(-1px);
}

/* 移除原有的下拉菜单相关样式 */
.dropdown-menu,
.nav-dropdown .dropdown-menu,
.dropdown-trigger i:last-child {
    display: none;
}
